import 'package:flutter/material.dart';
import 'package:share/share.dart';

class TestScreen extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body:Container(
//        padding: const EdgeInsets.all(32.0),
          child:Column(
            children: <Widget>[
              Row(

//            crossAxisAlignment: CrossAxisAlignment.start,
                  children:<Widget>[
                    new Expanded(
                      child: Column(
                        children: <Widget>[
                          Container(
                            height: 80,
                            child: ListView(
                              //        // Center is a layout widget. It takes a single child and positions it
                              //        // in the middle of the parent.
                              //        child: Column(
                              //          // Column is also layout widget. It takes a list of children and
                              //          // arranges them vertically. By default, it sizes itself to fit its
                              //          // children horizontally, and tries to be as tall as its parent.
                              //          //
                              //          // Invoke "debug painting" (press "p" in the console, choose the
                              //          // "Toggle Debug Paint" action from the Flutter Inspector in Android
                              //          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
                              //          // to see the wireframe for each widget.
                              //          //
                              //          // Column has various properties to control how it sizes itself and
                              //          // how it positions its children. Here we use mainAxisAlignment to
                              //          // center the children vertically; the main axis here is the vertical
                              //          // axis because Columns are vertical (the cross axis would be
                              //          // horizontal).
                              //          mainAxisAlignment: MainAxisAlignment.center,
                              //          children: <Widget>[
                              //            Text(
                              //              'LiuBin dashen have clicked the button this many times:',
                              //            ),
                              //            Text(
                              //              '$_counter',
                              //              style: Theme.of(context).textTheme.display1,
                              //            ),
                              //          ],
                              //        ),
                              scrollDirection:Axis.horizontal,
                              children:<Widget>[
                                RaisedButton(
                                  onPressed: (){
                                    print('点击了一号按钮');
                                    Share.share('check out my website https://example.com');
                                  },
                                  color: Colors.green,
                                  child: Text('一'),
                                ),
                                RaisedButton(
                                  onPressed: () {
                                    print('点击了二号按钮');
                                  },
                                  color: Colors.red,
                                  child: Text('二'),
                                ),
                                RaisedButton(
                                  onPressed: () {
                                    print('点击了三号按钮');
                                  },
                                  color: Colors.yellow,
                                  child: Text('三'),
                                ),
                                RaisedButton(
                                  onPressed: () {
                                    print('点击了四号按钮');
                                  },
                                  color: Colors.lightBlue,
                                  child: Text('四'),
                                ),
                                RaisedButton(
                                  onPressed: () {
                                    print('点击了五号按钮');
                                  },
                                  color: Colors.lightGreenAccent,
                                  child: Text('五'),
                                )
                              ],
                            ),
                          )
                        ],
                      ),
                    ),

                  ]
              ),
              Row(
                children: <Widget>[
                  new Expanded(
                      child: Container(
                        height: 480,
                        child: ListView(
                          children: <Widget>[
                            Container(
                                height: 200,
                                color: Colors.green,
                                child:Center(
                                  child: Text( '一',
                                      style:TextStyle(
                                          color: Colors.white,
                                          fontSize: 30
                                      )
                                  ),
                                )
                            ),
                            Container(
                                height: 200,
                                color: Colors.red,
                                child:Center(
                                  child: Text('二',
                                      style:TextStyle(
                                          color: Colors.white,
                                          fontSize: 30
                                      )
                                  ),
                                )
                            ),
                            Container(
                                height: 200,
                                color: Colors.yellow,
                                child:Center(
                                  child: Text('三',
                                      style:TextStyle(
                                          color: Colors.lightBlue,
                                          fontSize: 30
                                      )
                                  ),
                                )
                            )
                          ],
                        ),
                      )
                  )
                ],
              ),
            ],
          )
      )
    );
  }
}
